import http from "@/utils/http";
import type {ResponseData} from "@/types/user";
import type {CategoryData2} from "@/types/category";

//获取二级分类数据
export function getCategoryAPI (id:string) {
  return http<ResponseData<CategoryData2>>({
    url: '/category',
    params: {
      id
    }
  })
}

export function getCategorySubFilterAPI(id:string){
  return http({
    url:'/category/sub/filter',
    params:{
      id
    }
  })
}

export function postCategoryGoodsTemporaryAPI(data){
  return http({
    url:'/category/goods/temporary',
    method:'post',
    data
  })
}